<template>
    <input type="text" @keyup.enter="add" :value="val">
</template>

<script>
export default {
  props: {
    val: {
      default: ''
    }
  },
  name: 'IPT',
  methods: {
    add (event) {
      this.$emit('getVal', event.target.value)
      event.target.value = ''
    }
  }
}
</script>

<style>
</style>
